inquire = function(){
	function createRadioGroup(option) {
		var obj=null;
		var individual = new Ext.Panel({
			   // xtype: 'panel',
			    id:'indivdualId',
			   // layout: 'hbox',
			    margin: '0 0 10'			   
			});
		Ext.Ajax.request({  
	        url : 'selectInquireAction.action',  
	        params : {  
	        	//jsonString : jsonString
	        },  
	        method : 'POST',  
	        success : function(response, opts) {  
	            obj = Ext.decode(response.responseText);
	            for(var i = 0;i<obj.inquireList.length;i++){
	        	    var radioGroup = {
	        	        xtype: 'fieldset',
	        	        title: i+1,
	        	        layout: 'form',
	        	        collapsible: true,
	        	        items: [{
	        	            xtype: 'component',
	        	            html: obj.inquireList[i].inquireTitle
	        	            //cls: "a"
	        	        },{
	        	            xtype: 'radiogroup',
	        	            allowBlank :false,
	        	            fieldLabel: '请选择',
	        	            blankText:'你必须选择一项',
	        	            //cls: 'x-check-group-alt',
	        	            items: [
	        	                {boxLabel: 'A.'+obj.inquireList[i].inquireA, name: 'answer['+i+']', inputValue: "A"},
	        	                {boxLabel: 'B.'+obj.inquireList[i].inquireB, name: 'answer['+i+']', inputValue: "B"},
	        	                {boxLabel: 'C.'+obj.inquireList[i].inquireC, name: 'answer['+i+']', inputValue: "C"},
	        	                {boxLabel: 'D.'+obj.inquireList[i].inquireD, name: 'answer['+i+']', inputValue: "D"}
	        	            ]
	        	        }]
	        	    };
	        	    Ext.getCmp('indivdualId').add(radioGroup);	        	   
	        		};
	           // Ext.Msg.alert(obj.inquireList[0].inquireCode);  
	        }  
	    });
		
		
		 Ext.getCmp('indivdualId').doLayout();
	    return individual;
	};
	var fp = Ext.create('Ext.FormPanel', {
	    title: '问卷调查',
	    frame: true,
	    fieldDefaults: {
	        labelWidth: 110,
	        labelStyle: 'color:green;padding-left:4px'
	    },
	    width: 900,
	   // renderTo:'form-ct',
	    bodyPadding: 10,
	    items: [
	            createRadioGroup(),
	            {
	            	xtype:'htmleditor',
	            	//width:500,
					id:'studentInquireOtherId',
					name:'other',
	        		height:300,
	        		fieldLabel: '其他建议'
	            },{
	            	 xtype:'radiogroup',
	            	 fieldLabel: '是否匿名提交',
	                 width: 200,
	                 id:'identity',
	                 items: [{
	                     name: 'isHidden',
	                     inputValue: '1',
	                     boxLabel: '是',
	                     checked: true
	                 }, {
	                    name: 'isHidden',
	                    inputValue: '0',
	                    boxLabel: '否'
	                 }]
	            }
	    ],
	    buttons: [{
	        text: '提交',
	        handler: function(){
	            if(fp.getForm().isValid()){
	               // Ext.Msg.alert('Submitted Values', 'The following will be sent to the server: <br />'+
	                fp.getForm().submit({
	    				waitTitle : '提示',//标题
	    				waitMsg : '正在提交数据请稍后...',//提示信息
	    				url : "addInquireAnswerAction.action",
	    				method : 'post',
	    				params : {
	    					
	    				}, //参数
	    				success : function(form, action) {
	    					var flag=action.result;
	    					if(flag.success){
	    						Ext.Msg.alert("提示","提交成功");
	    					}else{
	    						Ext.Msg.alert("提示",flag.msg);
	    					}
	    				},
	    				failure : function(form,action) {
	    					var flag=action.result;
	    					Ext.Msg.alert("提示",flag.msg);
	    				}
	    			});
	    	
	            }
	            else{
	            	Ext.Msg.alert("提示","请有未选择项");
	            }
	        }
	    }]
	});
	return fp;
}